<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>添加内容</title>
    <link rel="stylesheet" type="text/css" href="skin/css/base.css">
    <script type="text/javascript">
    	function changeState()
    	{
    		var obj = document.contentFM.status;
    		var selVal = obj.options[obj.selectedIndex].value;
    		document.contentFM.selIndex.value = selVal;	 		
    	}
    	
    	function doUpdate()
    	{
    		if(document.contentFM.selIndex.value == 255)
    		{
    			alert("请选择状态!");
    			return;
    		}
    		document.contentFM.submit();
    	}
    	
    	function doSubmit()
    	{
    		if(document.contentFM.status.value == 255)
    		{
    			alert("请选择状态!");
    			return false;
    		}else{
    		
    			return true;
    		}    		
    		
    	}
    </script>
    <script type="text/javascript" charset="utf-8" src="./kedit/kindeditor.js"></script>
   <script type="text/javascript">
   
    KE.init({
        id : 'content1',
        cssPath : './indexe.css',
        items : ['source',
        'preview', 'undo', 'redo',  'link', 'unlink', 'image','specialchar','date','time'
        ]

    });
    
     KE.event.ready(function(){
               // KE.create(editorId);
                editorId = 'content1';
                KE.create(editorId);
               
                //IE下回车时生成<br />
			     KE.util.pToBr(editorId);

               
            });
   </script>
  </head>  
  <body leftmargin="8" topmargin="8" background='skin/images/allbg.gif'>
		<!--  内容列表   -->
		<form name="contentFM" action="<%=path%>/admin/contentMgr.do" method="post">
			<input type="hidden" name="execute" value="insert">
			<input type="hidden" name="selIndex" value="">
			<table width="98%" border="0" cellpadding="2" cellspacing="1"
				bgcolor="#D1DDAA" align="center" style="margin-top: 8px">
				<tr bgcolor="#E7E7E7">
					<td height="24" colspan="2" background="skin/images/tbg.gif">
						&nbsp;添加内容&nbsp;
					</td>
				</tr>				
				<tr height="22">
					<td width="4%" bgcolor="#FAFAF1" align="right">
						标题
					</td>
					<td width="96%" bgcolor="#FFFFFF" onmousemove="javascript:this.bgColor='#FCFDEE';" onmouseout="javascript:this.bgColor='#FFFFFF';">
						<input type="text" name="title" size="50" value="">
					</td>
				</tr>				
				<tr height="22">
					<td width="4%" bgcolor="#FAFAF1" align="right">
						内容
					</td>
					<td width="96%" bgcolor="#FFFFFF" onmousemove="javascript:this.bgColor='#FCFDEE';" onmouseout="javascript:this.bgColor='#FFFFFF';">
						<textarea name="content" id="content1" rows="30" cols="45"></textarea>						
					</td>					
				</tr>
				<tr height="22">
					<td width="4%" bgcolor="#FAFAF1" align="right">
						状态
					</td>
					<td width="96%" bgcolor="#FFFFFF" onmousemove="javascript:this.bgColor='#FCFDEE';" onmouseout="javascript:this.bgColor='#FFFFFF';">
						<select name="status" onchange="changeState()">
							<option value="255">-- 请选择 --</option>
							<option value="0" >停止浏览</option>
							<option value="1" >开放浏览</option>
						</select>
					</td>
				</tr>								
				
				<tr bgcolor="#FAFAF1">
					<td height="35" colspan="10">
						&nbsp;
						<input class="coolbg" type="submit" value="保存" onclick="return doSubmit()"/>					
					</td>
				</tr>			
			</table>
		</form>		
	</body>
</html>